
function executeScriptAtStartUp(command) {
    var codediv = document.createElement("button");
    codediv.setAttribute("style", "display:hidden");
    codediv.setAttribute("onclick", command.replace("\"", "&quot;"));
    document.lastChild.appendChild(codediv);
    codediv.click();
    document.lastChild.removeChild(codediv);
}

function injectScript(filename) {
    var scriptobj = document.createElement("script");
    scriptobj.src = filename;
    var target = document.head ? document.head : document.lastChild;
    target.appendChild(scriptobj);
}
function injectScripts(response) {
    if (response.ie_script_declaration)
        injectScript(chrome.extension.getURL("ie_script_declaration.js"));
}
chrome.extension.sendRequest({command:"PageLoadAction", url:location.href}, injectScripts);